#include <iostream>
using namespace std;
class mylist
{
    struct link
    {
        struct user 
        {
            string name;
            double price;
            static int rate;//利率
        };
        link*next;
    };
public:
    link*head;
    link*tail;
	void append(const char* name,double price);

};
mylist::mylist()
{
    head=(struct link*)malloc(sizeof(struct link));
    head->next=NULL;
	tail=head;
    cout << head << endl;
}
mylist::~mylist()
{
	while(head->next!=NULL)
	{
		link* temp=head->next;
		head->next=temp->next;
		free(temp);
	}
	free(head);
	cout << "链表已销毁" << endl;
    cout << head << endl;
}
void append(const char*name,double price)
int rate;
int main()
{
    mylist a;
    cout << sizeof(a) << endl;
    return 0;
}

